Skip to main content

22.03.09 - Direct Methods

  • Cramers Method requires the calculation of 1 determinant of a nn order matrix and nn determinate of nn order matrices
  • Means n!+n(n!)n!+n(n!) elementary operations
  • Need to find alternative methods as takes too long

Theoretical Foundations of Direct Methods

Elementary Row Operations

  • E1E_1: Swap of two rows aia_i and aja_jaiaja_i \leftarrow a_jajaia_j \leftarrow a_i
  • E2E_2: Multiplication of a row aia_i by a scalar λR\lambda\in\Raiλaia_i\leftarrow\lambda a_i
  • E3E_3: Substitution of a row aia_i by the sum of the row aia_i to another row aja_j: aiai+aja_i\leftarrow a_i+a_j

Equivalent Matrices and Equivalent Systems

Equivalent Matrices: Apply the elementary row operations on AA, obtain new matrix CRm,nC\in\R_{m,n}.

Equivalent Systems: 2 systems of linear equations in the same variables: Ax=bAx=b and Cx=dCx=d. These two systems are equivalent if they have the same solutions

Consider a system of mm linear equations in nn variables Ax=bAx=b. Let AcRm,n+1A^c\in\R_{m,n+1} be the complete matrix associated with this system. If another system of linear equations is associated with a complete matrix AcRm,n+1A^{'c}\in\R_{m,n+1} equivalent to AcA^c, then the two systems are equivalent

  • E1E_1: The swap of two rows, the equations of the system are swapped, no effect on the solution of the system
  • E2E_2: Same solutions, modified systems is equivalent to the original one
  • E3E_3: After operation, the modified system is equivalent in solutions to the original one

Direct Methods

Direct methods are methods for solving systems of linear equations by manipulating the original matrix to produce an equivalent system that can be easily solved. A typical manipulation is the transformation of a system of linear equation into triangular system

Gaussian Elimination

Ax=bAx=b

  1. Construct the complete matrix AcA^c
  2. Apply the elementary row operations to obtain a staircase complete matrix and triangular incomplete matrix, that is we add rows to obtain a null element in the desired position
  3. Write down the new system of linear equations
  4. Solve the nthn^{th} equations of the system and use the result to solve the (n1)th(n-1)^{th}
  5. Continue recursively until the first equation

To obtain the matrix would do: r2(2)=r2(1)+(a2,1(1)a1,1(1))×r1(1)r^{(2)}_2=r^{(1)}_2+(\frac{-a^{(1)}_{2,1}}{a^{(1)}_{1,1}})\times r^{(1)}_1 As it keeps going on, it gets longer and longer, to create a matrices with leading zeros

Dan Method: an,m(an,1×an1,m)a_{n,m}-(a_{n,1}\times a_{n-1,m}) This completes the first 2 rows and first column. Then have to increase m, to do second column

LU factorisation

Direct method that transforms a Matrix into a matrix product LULU where LL is a lower triangular matrix having the diagonal elements all equal to 1 and UU is an upper triangular matrix Ax=bLUx=bAx=b\Rightarrow LUx=b Pose Ux=yUx=y solve at first the triangular system Ly=bLy=b and then extract xx from the triangular system Ux=yUx=y Does not alter the vector of known terms bb.

If working with non singular matrix, then split any matrix into a product such that A=LUA=LU. If non-singular matrix and is square, and has det of 0, then !\exists! lower traingular matrix LL having all the diagonal elements equal to 1 and !\exists! upper triangular matrix UU such that A=LUA=LU

Equivalence of Gaussian elimination and LU factorisation

  • Gaussian elimination and LU factorisation are both direct methods
  • They are not identical but they are equivalent
  • Whilst performing the algorithm the LU factorisation is implicitly performed
  • Both Gaussian elimination and LU factorisation have a lower complexity than theoretical methods
  • The complexity is in the order of n3n^3 operations

Short introduction to Iterative Methods

Jacobi's Method - Starts from an initial guess x(0)x^{(0)}, iteratively apply some formulas to detect the solution of the system. Unlike direct methods that converge to the theoretical solution in a finite time, iterative methods are approximate since they converge, under some conditions de24a6992d8ae1212eee0928d816f2a3.png